﻿{{ define "blog/articledetail.html"}}

{{template "blog/headwitheditor.html" .}}

<body>

<!-- Start wrapper-->
<div id="wrapper">

{{template "blog/topbar.html" .}}

  <div class="clearfix"></div>
  <div class="content-wrapper" style="margin-left: 0px;">
    <div class="container-fluid">

      <!-- start navigation -->
      <div class="card">
        <div class="card-body">
          <ul class="nav nav-tabs nav-tabs-primary">
            <li class="nav-item">
              <a class="nav-link active" href="/index.html"><i class="icon-home"></i>主页</a>
            </li>
            {{range $topblocktitle, $subblockinfos := .blockinfos}}
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="javascript:void();"><i class="zmdi zmdi-book"></i>{{$topblocktitle}}</a>
              <div class="dropdown-menu">
              {{range $subblockinfos}}
                <a class="dropdown-item" href="/articlelist.html?blockid={{.Id}}">{{.Title}}</a>
              {{end}}
              </div>
            </li>
            {{end}}
            <li class="nav-item">
              <a class="nav-link" href="https://www.blacksea3.top/oj/"><i class="zmdi zmdi-edit"></i>判题系统</a>
            </li>
          </ul>
        </div>
      </div>
      <!-- end navigation -->

      <!-- start main page -->
      <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
          <h4 class="mb-0 text-black">{{.content.Title}}</h4>
          <h6 class="mb-0 text-black">{{.content.ext_blockname}}</h6>
          <h6 class="mb-0 text-black">{{.content.Edittime}}</h6>
          <p class="text-black">{{.content.Brief}}</p>
          <div id="markdown-view">
            <!-- Server-side output Markdown text -->
            <textarea style="display:none;">{{.content.Content}}</textarea>             
          </div>
        </div>
      </div>
      <!--end main page -->
    </div>
	    <!--start overlay-->
        <div class="overlay toggle-menu"></div>
      <!--end overlay-->
    </div>
    <!-- End container-fluid-->

  </div><!--End content-wrapper-->
  <!--Start Back To Top Button-->
  <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
  <!--End Back To Top Button--> 

  {{template "blog/footer.html"}}
</div><!--End wrapper-->

  {{template "blog/tail.html"}} <!-- javascripts -->

  <!-- editormd show js -->
  <script src="/static/editor.md/editormd.js"></script>
  <script src="/static/editor.md/lib/marked.min.js"></script>
  <script src="/static/editor.md/lib/prettify.min.js"></script>
  <script type="text/javascript">
      $(function() {
        var testView = editormd.markdownToHTML("markdown-view", {
              // markdown : "[TOC]\n### Hello world!\n## Heading 2", // Also, you can dynamic set Markdown text
              // htmlDecode : true,  // Enable / disable HTML tag encode.
              // htmlDecode : "style,script,iframe",  // Note: If enabled, you should filter some dangerous HTML tags for website security.
          });
      });
  </script>

</body>
</html>
{{ end }}
